ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






OPERATOR:  Or

Or

The Or operator is to perform a logical disjunction on two expressions. The expressions must be of Boolean subtype (True or False) or Null. The order of the expressions is important.

Code:
<% =True Or True %>
<% =True Or False %>
<% =False Or True %>
<% =False Or False %>

<% =True Or Null %>
<% =Null Or True %>
<% =False Or Null %>
<% =Null Or False %>
<% =Null Or Null %>

Output:
True
True
True
False

True
True
(Null output)
(Null output)
(Null output)

Code:
<% expression1 = True %>
<% expression2 = False %>
<% =expression1 Or expression2 %>

Output:
True